import axios from 'axios'

// 上传文件
export function upload(file) {
    const formData = new FormData();
    formData.append('file', file);
    return axios.post(import.meta.env.VITE_API_URL + '/common/upload', formData, {
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    }).then(response => response.data).catch(error => error);
}